<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*,java.util.*"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<jsp:useBean id="del" scope="session" class="dataconn.MyDbBean"/>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>删除记录</title>
    </head>
    <body>
        <%!	String xuehao,url,sql; %>        
        <%
           xuehao=request.getParameter("xuehao").trim();
           try
           {
               //调用getConn()方法与数据库建立连接
               del.getConn("Data_Stu","sa","");
               sql="delete from stuInfo where 学号='"+xuehao+"'";
               del.executeUpdate2(sql);
               out.println("<font size=3 color=blue>正在删除数据，请稍后......</font>" +"<meta http-equiv='refresh' content='2;url=list.jsp'>");
               del.closeStmt();
               del.closeConn();
           }
           catch(Exception e)
           {
               response.sendRedirect("err.jsp");
           }
       %>
    </body>
</html>






